using AspNetCoreMVC.Models;
using Microsoft.EntityFrameworkCore;

namespace AspNetCoreMVC.Db
{
    public class mvcDemoDb:DbContext
    {
        private readonly string constring="server=.;database=mvcDemoDb;uid=sa;pwd=123456";
        protected override void OnConfiguring(DbContextOptionsBuilder builder){
            builder.UseSqlServer(constring);
        }
        public DbSet<Category> category{get;set;}
        public DbSet<Product> products{get;set;}
    }
}